
package com.linxiao.payment.core.constants;

/**
* 接口返回码
*
 * @author qiqi
*/
public enum ApiCodeEnum {

    /**
     * 请求成功
     */
    SUCCESS(0, "SUCCESS"),

    /**
     * 自定义业务异常
     */
    CUSTOM_FAIL(9999, "自定义业务异常"),

    SYSTEM_ERROR(10, "系统异常[%s]"),
    PARAMS_ERROR(11, "参数有误[%s]"),
    DB_ERROR(12, "数据库服务异常"),

    //用户大网未登录
    USER_NOT_LOGIN(1000, "用户未登录"),
    USER_NOT_BIND_MOBILE(1001, "用户未绑定手机号"),
    USER_NOT_MATCH(1002, "提现请求的用户和当前登录的用户不一致"),
    USER_SMS_CODE_CHECK_FAIL(1003, "[%s]短信验证码验证失败"),
    USER_WITHDRAW_FAIL(1004, "用户提现失败"),
    USER_WITHDRAW_AMOUNT_ERR(1005, "用户提现金额必须大于0，小于限制金额，且小于余额"),
    USER_WITHDRAW_SMS_REPEAT(1006, "[%s] [%s]分钟内已经发送过验证码,无需重复发送"),
    USER_WITHDRAW_SMS_TIMES_OVER(1007, "[%s]当天已经发送验证码超过[%s]次,请24小时后再试"),
    USER_WITHDRAW_SMS_CODE_MISS(1008, "[%s]没有下发验证码记录,或者已经过期"),
    USER_WITHDRAW_SMS_CHECK_TIME_OVER(1009, "[%s]错误码次数超过[%s]次，请24小时后再试"),


    REFUND_OP_TYPE_ERROR(2000, "退款异常订单操作类型错误"),


    SYS_OPERATION_FAIL_CREATE(5000, "新增失败"),
    SYS_OPERATION_FAIL_DELETE(5001, "删除失败"),
    SYS_OPERATION_FAIL_UPDATE(5002, "修改失败"),
    SYS_OPERATION_FAIL_SELETE(5003, "记录不存在"),
    SYS_PERMISSION_ERROR(5004, "权限错误，当前用户不支持此操作"),
	SYS_OPERATION_FAIL_IMPORT(5005, "导入失败"),

	ORDER_NOT_FUND(6000, "订单不存在"),
	ORDER_REPEAT(6001, "订单重复");


    private int code;

    private String msg;

    ApiCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
